//对外暴露全局组件的插件对象
import SvgIcon from './SvgIcon.vue'
import type { App, Component } from 'vue'

const globalComponents: Record<string, Component> = { SvgIcon }

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

export default {
  install(app: App) {
    Object.keys(globalComponents).forEach((key: string) => {
      app.component(key, globalComponents[key] as Component)
    })
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  },
}
